﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace sunt.AJAX.Demo.sunt.UpdataPanel.UCControl
{
    public partial class WebUserControl1 : System.Web.UI.UserControl
    {
        private Random _Random = new Random(DateTime.Now.Millisecond);
        protected void Page_Load(object sender, EventArgs e)
        {
            //生成的随机数大于0.5时，更新UpdataPanel
            if (_Random.NextDouble() > 0.5)
            {
                this.UpdatePanel1.Update();
            }
        }
    }
}